package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TmcUserCarMapper;
import com.ruoyi.system.domain.TmcUserCar;
import com.ruoyi.system.service.ITmcUserCarService;

/**
 * 车辆管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-06-28
 */
@Service
public class TmcUserCarServiceImpl implements ITmcUserCarService 
{
    @Autowired
    private TmcUserCarMapper tmcUserCarMapper;

    /**
     * 查询车辆管理
     * 
     * @param id 车辆管理ID
     * @return 车辆管理
     */
    @Override
    public TmcUserCar selectTmcUserCarById(Long id)
    {
        return tmcUserCarMapper.selectTmcUserCarById(id);
    }

    /**
     * 查询车辆管理列表
     * 
     * @param tmcUserCar 车辆管理
     * @return 车辆管理
     */
    @Override
    public List<TmcUserCar> selectTmcUserCarList(TmcUserCar tmcUserCar)
    {
        return tmcUserCarMapper.selectTmcUserCarList(tmcUserCar);
    }

    /**
     * 新增车辆管理
     * 
     * @param tmcUserCar 车辆管理
     * @return 结果
     */
    @Override
    public int insertTmcUserCar(TmcUserCar tmcUserCar)
    {   tmcUserCar.setCreateTime(DateUtils.getNowDate());
        return tmcUserCarMapper.insertTmcUserCar(tmcUserCar);
    }

    /**
     * 修改车辆管理
     * 
     * @param tmcUserCar 车辆管理
     * @return 结果
     */
    @Override
    public int updateTmcUserCar(TmcUserCar tmcUserCar)
    {
        tmcUserCar.setUpdateTime(DateUtils.getNowDate());
        return tmcUserCarMapper.updateTmcUserCar(tmcUserCar);
    }

    /**
     * 批量删除车辆管理
     * 
     * @param ids 需要删除的车辆管理ID
     * @return 结果
     */
    @Override
    public int deleteTmcUserCarByIds(Long[] ids)
    {
        return tmcUserCarMapper.deleteTmcUserCarByIds(ids);
    }

    /**
     * 删除车辆管理信息
     * 
     * @param id 车辆管理ID
     * @return 结果
     */
    @Override
    public int deleteTmcUserCarById(Long id)
    {
        return tmcUserCarMapper.deleteTmcUserCarById(id);
    }
}
